]> git.r.bdr.sh - rbdr/map/blame - Map/Presentation/Base Components/EvolutionPicker.swift
Add license notices
[rbdr/map] / Map / Presentation / Base Components / EvolutionPicker.swift
CommitLineData
98f09799
RBR
1/*
2 Copyright (C) 2024 Rubén Beltrán del Río
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see https://map.tranquil.systems.
16 */
77d0155b
RBR
17import SwiftUI
18
19struct EvolutionPicker: View {
20
e2c37ac1 21 @Binding var selectedEvolution: StageType
77d0155b
RBR
22
23 var body: some View {
e2c37ac1 24 Picker("Evolution", selection: $selectedEvolution) {
77d0155b 25 ForEach(StageType.types) { stage in
e2c37ac1 26 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
77d0155b
RBR
27 }
28 Divider()
29 ForEach(StageType.characteristics) { stage in
e2c37ac1 30 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0).font(.theme.body)
77d0155b
RBR
31 }
32 Divider()
33 ForEach(StageType.properties) { stage in
e2c37ac1 34 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
77d0155b
RBR
35 }
36 Divider()
37 ForEach(StageType.custom) { stage in
e2c37ac1 38 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
77d0155b 39 }
e2c37ac1 40 }.font(.theme.body).padding(.horizontal, 8.0).padding(.vertical, 4.0)
77d0155b
RBR
41 }
42}
43
e2c37ac1
RBR
44#Preview {
45 let selectedEvolution: StageType = .behavior
46 EvolutionPicker(selectedEvolution: .constant(selectedEvolution))
77d0155b 47}